<template>
  <hyb-page :title="t_title">
    <template v-slot:top>
      <view class="gui-bg-white gui-dark-bg-level-3 gui-padding">
        <gui-switch-navigation v-if="filterData.tag == 'yg'" :items="navItems_yg" @change="navChange"
          textAlign="center" :isCenter="true" activeDirection="center" :size="0" :margin="20" padding="20rpx">
        </gui-switch-navigation>
        <gui-switch-navigation v-else :items="navItems" @change="navChange" textAlign="center" :isCenter="true"
          activeDirection="center" :size="0" :margin="20" padding="20rpx"></gui-switch-navigation>
      </view>
    </template>

    <template v-slot:body>
      <view style="height: 90rpx;" class="gui-margin-top-middle"></view>

      <view v-for="(item,index) in list" :key="index"
        class="gui-bg-white gui-padding gui-border-b gui-margin-top-middle">

        <view class="gui-flex gui-space-between gui-align-items-center">
          <view class="gui-text gui-bold gui-color-gray" v-if="order_list_style==1">
            {{ getDisplayText(item.fa_fwstyle1, item.fa_fwstyle2) }}
          </view>

          <text class="gui-text-small gui-color-black">订单号：{{ item.fa_ordersn}}</text>
        </view>

        <view v-if="order_list_style==1">
          <view
            :url="'/hyb_o2o/inner/pages/fabu/detail?id=' + (item.fa_id) +'&tag=' + this.filterData.tag +'&t_y_id=' + t_y_id"
            class="gui-margin-top gui-border-t">
            <view class="gui-text-small gui-padding-y gui-color-gray relative"
                  @tap="toDetail(item.fa_id,item.o_status)">
              <text>{{item.fa_fwcontent}}</text>
              <text v-if="item.fa_pay_type == '线下支付'" 
                    style="color: #165DFF; float: right;">待商家确认</text>
            </view>
            <view class="gui-text gui-flex gui-align-items-center gui-space-between"
              @tap="toDetail(item.fa_id,item.o_status)">
              <view>发布人：
                <text class="gui-color-gray gui-margin-x-small gui-text-small">{{item.fa_name}} </text>
              </view>
              <text class="gui-icons gui-color-gray gui-margin-left">
				  <text v-if="item.o_status == 10 "
				 				    class="gui-color-red gui-margin-x-small gui-text-small">待付款</text>
				 				  <text v-if="item.o_status == 12 "
				 				    class="gui-color-red gui-margin-x-small gui-text-small">已取消</text>
				 				  <!-- 竞标订单特殊处理：有师傅报名时显示已报价人数 -->
				 				  <text v-if="item.o_status == 15 && item.fa_fwpay_type == '参与竞标' && item.fa_fwry_id"
				 				    class="gui-color-blue gui-margin-x-small gui-text-small">已报价</text>
				 				  <!-- 普通订单或无报名的竞标订单显示待接单 -->
				 				  <text v-else-if="item.o_status == 15 "
				 				    class="gui-color-red gui-margin-x-small gui-text-small">待接单</text>
				 				  <!-- 上门估价订单特殊处理：已接单但未报价时显示待报价 -->
				 				  <text v-if="item.o_status == 20 && item.fa_fwpay_type == '上门估价' && item.fa_fwmoney == 0"
				 				    class="gui-color-orange gui-margin-x-small gui-text-small">待报价</text>
				 				  <!-- 上门估价订单已报价但未支付时显示待支付 -->
				 				  <text v-else-if="item.o_status == 20 && item.fa_fwpay_type == '上门估价' && item.fa_fwmoney > 0 && item.is_pay == 0"
				 				    class="gui-color-blue gui-margin-x-small gui-text-small">待支付</text>
				 				  <!-- 其他订单或已支付的上门估价订单显示待服务 -->
				 				  <text v-else-if="item.o_status == 20"
				 				    class="gui-color-red gui-margin-x-small gui-text-small">待服务</text>
				 				  <text v-if="item.o_status == 25 "
				 				    class="gui-color-red gui-margin-x-small gui-text-small">服务中</text>
				 				  <text v-if="item.o_status == 29 "
				 				    class="gui-color-red gui-margin-x-small gui-text-small">待验收</text>
				 				  <text v-if="item.o_status == 30 || item.o_status == 35"
				 				    class="gui-color-red gui-margin-x-small gui-text-small">已完成</text>
				 				  <text v-if="item.o_status == 0"
				 				    class="gui-color-red gui-margin-x-small gui-text-small">接单取消</text>
				  &#xe601;</text>
            </view>
            <view @tap="toDetail(item.fa_id,item.o_status)"
              class="gui-text gui-flex gui-align-items-center gui-margin-top-middle"><text
                class="gui-flex-shrink0">发布时间：</text><text
                class="gui-color-gray gui-text-small gui-margin-x-small">{{item.fa_time}}
              </text>
            </view>
            <view v-if="item.ksfw_time"
              class="gui-text gui-flex gui-align-items-center gui-margin-top-middle"><text
                class="gui-flex-shrink0">开始时间：</text><text
                class="gui-color-gray gui-text-small gui-margin-x-small">{{item.ksfw_time}}
              </text>
            </view>
            <view @tap="toDetail(item.fa_id,item.o_status)"
              class="gui-text gui-flex gui-align-items-center gui-margin-top-middle"><text
                class="gui-flex-shrink0"></text><text
                class="gui-color-gray gui-text-small gui-margin-x-small">{{item.cz_bei_zhu}}
              </text>
            </view>

            <!-- 添加产品金额显示 -->
            <view v-if="item.pei_jian_money > 0"
              class="gui-text gui-flex gui-align-items-center gui-margin-top-middle">
              <text class="gui-flex-shrink0">产品金额：</text>
              <text class="gui-color-gray gui-text-small gui-margin-x-small">{{item.pei_jian_money}}元</text>
            </view>

            <!-- 添加盒子编号显示 -->
            <view v-if="item.box" class="gui-text gui-flex gui-align-items-center gui-margin-top-middle">
              <text class="gui-flex-shrink0">盒子编号：</text>
              <text class="gui-color-gray gui-text-small gui-margin-x-small">{{item.box.code}}</text>
            </view>

            <view v-if="item.ksfw_time && $store.state.base.show_base.fwts" class="gui-text gui-flex gui-space-between gui-margin-top-middle">
              <view>服务天数：</view>
              <text class="gui-color-gray gui-margin-x-small gui-text-small">{{getDays(item) + '天'}}
              </text>
            </view>

            <view class="gui-text gui-flex gui-align-items-center gui-margin-top-middle gui-space-between">
             <view class="gui-text gui-flex gui-align-items-center"> 付款方式：
                
                <text
                  class="gui-color-gray gui-margin-x-small gui-text-small">{{item.fa_pay_type}}</text>
              </view>
              

              <view class="gui-flex gui-align-items-center">
                <text v-if="item.fa_fwmoney > 0"
                      style="font-size: 15px;"
                      class="gui-list-body-desc gui-color-gray">{{item.jb_yusuan > 0?'定金':'金额'}}:<text
                  style="font-size: 15px;"
                  class="gui-color-red">￥{{item.fa_fwmoney}}</text></text>

                <text v-if="item.jb_yusuan > 0" class="gui-list-body-desc gui-color-gray ">预算:<text
                    class="gui-color-red">￥{{item.jb_yusuan}}</text></text>

                <text v-if="item.fa_tzmoney > 0"
                  class="gui-list-body-desc gui-color-gray ">&ensp;待支付:<text
                    class="gui-color-red">￥{{item.fa_tzmoney}}</text></text>
              </view>
            </view>

            <view @tap="toDetail(item.fa_id,item.o_status)"
              class="gui-text gui-flex gui-align-items-center gui-margin-top-middle"><text
                class="gui-flex-shrink0">订单类型：</text><text
                class="gui-color-gray gui-text-small gui-margin-x-small">{{item.fa_fwpay_type}}
              </text>
            </view>
            <view @tap="toDetail(item.fa_id,item.o_status)"
              class="gui-text gui-flex gui-align-items-center gui-margin-top-middle"><text
                class="gui-flex-shrink0">服务地址：</text><text
                class="gui-color-gray gui-text-small gui-margin-x-small">{{item.fa_fwaddress}}{{item.fa_fwaddresss}}
              </text>
            </view>

            <!-- 添加更详细的服务人员信息 -->
            <view class="gui-text gui-flex gui-align-items-center gui-margin-top-middle">
              <text class="gui-flex-shrink0">服务人员：</text>
              <text class="gui-color-gray gui-text-small gui-margin-x-small">
                {{item.yuangong?item.yuangong.y_name:'无'}}
                <text v-if="item.yuangong">({{item.yuangong.y_telphone}})</text>
              </text>
            </view>

            <view
              class="gui-flex gui-align-items-center gui-justify-content-end gui-border-t gui-margin-top-small"
              style="gap: 20rpx;padding: 20rpx 0 0;flex-wrap: wrap;">
              
              <!-- 扫码领单功能 -->
              <view v-if="(filterData.tag == 'manage' || filterData.tag == 'dl' || filterData.tag == 'yg') && !item.u_id && item.o_status < 30"
                @tap="lingdan(item.fa_id)" class="gui-margin-left gui-color-blue">
                  扫码领单
              </view>
              
              <!-- 操作盒子相关功能 -->
              <view v-if="item.order_type=='快递订单' && filterData.tag == 'yg' && t_y_id == item.fa_fwry_id && item.o_status== 25 && item.box.status == 2"
                @tap="openShelf(item)" class="gui-margin-left gui-color-blue">
                操作盒子
              </view>
              
              <view v-if="item.order_type=='快递订单' && filterData.tag == 'yh' && $store.state.userinfo.u_id == item.u_id && item.o_status== 14 && item.box_id>0"
                @tap="caozuo(item)" class="gui-margin-left gui-color-blue">
                操作盒子
              </view>

              <view v-if="item.order_type=='快递订单' && filterData.tag == 'yh' && $store.state.userinfo.u_id == item.u_id && item.o_status== 14 && item.box_id==0"
                @tap="toudi(item.fa_id)" class="gui-margin-left gui-color-blue">
                选择盒子
              </view>

              <!-- 核销功能 -->
              <view v-if="filterData.tag == 'yh' && item.fuwu && item.fuwu.x_xingshi == '到店服务' && item.o_status == 13"
                @tap="hexiao(item)" class="gui-margin-left gui-color-blue">
                去使用
              </view>

              <view v-if="filterData.tag == 'sj' && item.fuwu && item.fuwu.x_xingshi == '到店服务' && item.o_status == 13"
                @tap="hexiao1(item)" class="gui-margin-left gui-color-blue">
                核销
              </view>

              <!-- 扫码签到/签出 -->
              <!-- #ifdef MP -->
              <view v-if="$store.state.base.show_base.sm_qian_dao && filterData.tag == 'yg' && item.yg_flag && item.o_status == 20 && $store.state.base.qd_flag==1 && !item.qd_flag"
                @tap="qiandao(item)" class="gui-margin-left gui-color-blue">
                扫码签到
              </view>
              <!-- #endif -->

              <!-- #ifdef H5 -->
              <view v-if="$store.state.base.show_base.sm_qian_dao && filterData.tag == 'yg' && item.yg_flag && item.o_status == 20 && $store.state.base.qd_flag==1 && !item.qd_flag"
                @tap="qiandao1(item)" class="gui-margin-left gui-color-blue">
                师傅签到
              </view>
              <!-- #endif -->

              <!-- #ifdef MP -->
              <view v-if="$store.state.base.show_base.sm_qian_dao && filterData.tag == 'yg' && item.yg_flag && item.o_status == 25 && $store.state.base.qd_flag==1 && !item.qc_flag"
                @tap="qianchu(item)" class="gui-margin-left gui-color-blue">
                师傅签出
              </view>
              <!-- #endif -->

              <!-- #ifdef H5 -->
              <view v-if="$store.state.base.show_base.sm_qian_dao && filterData.tag == 'yg' && item.yg_flag && item.o_status == 25 && $store.state.base.qd_flag==1 && !item.qc_flag"
                @tap="qianchu1(item)" class="gui-margin-left gui-color-blue">
                扫码签出
              </view>
              <!-- #endif -->

              <!-- 查看报价按钮 - 竞标订单有师傅报名时显示 -->
              <view v-if="filterData.tag == 'yh' && item.o_status == 15 && item.fa_fwpay_type == '参与竞标' && item.fa_fwry_id "
                @tap="toDetail(item.fa_id,item.o_status)" class="gui-margin-left gui-color-blue">
                查看报价
              </view>

              <!-- 复制内容按钮 -->
              <view v-if="$store.state.base.show_base.ddfz" @tap="copy(item)"
                class="gui-margin-left gui-color-blue">
                复制内容
              </view>

              <view @tap="change(item,'qxdd')"
                v-if="(filterData.tag == 'manage' && item.o_status > 12 && item.o_status < 30) || filterData.tag == 'yh' && item.o_status <= 20 && item.o_status != 12"
                class="gui-margin-left gui-color-blue">取消订单
              </view>
              <view @tap="toDetail(item.fa_id,item.o_status)"
                v-if="item.fa_pay_type == '线下支付' "
                class="gui-margin-left gui-color-blue">线下转账
              </view>
              <!-- 用户尾款支付 -->
              <view
                v-if="item.o_status !=12 && filterData.tag == 'yh' && item.fa_tzmoney > 0 && item.is_pay == 1"
                type="default" @tap="pay(item.fa_id)"
                class="gui-margin-left gui-color-blue">
                支付
              </view>
              <!-- 用户下单未付款时支付 -->
              <view
                v-if="item.o_status !=12 && item.is_pay == 0 && filterData.tag == 'yh' && item.is_pay == 0 && item.fa_fwmoney > 0 && item.order_type!='回收订单'"
                type="default" @tap="pay(item.fa_id)"
                class="gui-margin-left gui-color-blue">
                支付
              </view>
              <!-- 师傅接回收订单时支付 -->
              <view
                v-if="filterData.tag == 'yg' && item.order_type=='回收订单' && item.o_status < 30 && item.o_status > 14 && item.is_pay == 0 && item.fa_fwmoney > 0 "
                type="default" @tap="pay(item.fa_id)"
                class="gui-margin-left gui-color-blue">
                支付
              </view>
              
              <view v-if="$store.state.base.show_base.dd_gtlt && item.o_status != 12 && item.o_status != 0" @tap.prevent="baojia(item)"
                  class="gui-margin-left gui-color-blue">沟通聊天</view>
           
              <view
                v-if="$store.state.base.sfyj && filterData.tag == 'yg' && item.pt_wzf_fengyong > 0 && item.fa_fwmoney>0 && item.o_status >= 25"
                @tap="payYj(item)" class="gui-margin-left gui-color-blue">支付佣金
              </view>

              <view v-if="filterData.tag == 'yh' && item.o_status == 30" @tap="pingjia(item.fa_id)"
                class="gui-margin-left gui-color-blue">评价服务
              </view>

              <view
                v-if="(filterData.tag == 'manage' || filterData.tag == 'sj') && $store.state.base.dayin"
                @tap="print(item.fa_id)" class="gui-color-blue gui-margin-left">打印</view>
              <view
                v-if="(filterData.tag == 'manage' || filterData.tag == 'dl' || filterData.tag == 'sj' ) && !item.fa_fwry_id && item.fa_fwpay_type != '参与竞标'"
                @tap="paidan(item)" class="gui-color-blue gui-margin-left">派单</view>
              <view
                v-if="(filterData.tag == 'dl' || filterData.tag == 'manage' ) && item.fa_fwry_id > 0 && item.o_status <= 25 "
                @tap="changeYg(item)" class="gui-color-blue">
                更换{{$store.state.base.show_base.shifu_bie_ming}}&ensp;
              </view>

              <view v-if="filterData.tag == 'yg' && item.o_status == 20 && item.q_styles == '已录用'"
                @tap="change(item,'qxjd')" class="gui-color-blue gui-margin-left">取消接单
              </view>
                            <view v-if="filterData.tag == 'yg' && item.o_status == 20 && item.q_styles == '已录用' && item.is_pay == 1 && (item.fa_fwpay_type != '上门估价' || (item.fa_fwpay_type == '上门估价' && item.fa_fwmoney > 0))"
                @tap="change(item,'ksfw')" class="gui-color-blue gui-margin-left">开始服务
              </view>
              
              <!-- 上门估价报价功能 -->
              <view v-if="(filterData.tag == 'yg' || filterData.tag == 'manage') && item.o_status == 20 && item.fa_fwpay_type == '上门估价' && item.fa_tzmoney == 0 && item.fa_fwmoney == 0"
                  class="gui-margin-left gui-color-blue">
                  <hyb-price title="报价" :data="item" @comfirm="comfrim"></hyb-price>
              </view>
              
              <!-- 上门估价修改报价功能 -->
              <view v-if="(filterData.tag == 'yg' || filterData.tag == 'manage') && item.o_status == 20 && item.fa_fwpay_type == '上门估价' && item.fa_fwmoney > 0 && item.is_pay == 0"
                  class="gui-margin-left gui-color-blue">
                  <hyb-price title="修改报价" :data="item" @comfirm="changePrice" :placeholder="'请输入新价格'"></hyb-price>
              </view>
			  
			  <!-- 师傅确认完成按钮 -->
			  <view v-if="item.pei_jian_pay != 1 &&  $store.state.base.show_base.sf_quren == 1 && item.is_pay  && filterData.tag == 'yg'   && (item.o_status == 29 || item.o_status == 25) && item.fa_tzmoney==0 && (($store.state.base.qd_flag==1 && item.qc_flag) || !$store.state.base.qc_flag)"
			    @tap="change(item,'qrwc')" class="gui-color-blue gui-margin-left">确认完成
              </view>
			  
			  <!-- 用户确认完成 -->
			  <view v-if="item.order_type !='回收订单' &&  filterData.tag == 'yh'  && item.is_pay && item.pei_jian_pay != 1 && $store.state.base.yh_qrwc &&  (item.o_status == 29 || item.o_status == 25) && item.fa_tzmoney==0 && (($store.state.base.qd_flag==1 && item.qc_flag) || !$store.state.base.qc_flag)"
			    @tap="change(item,'qrwc')" class="gui-color-blue gui-margin-left">确认完成
			  </view>
			  
			
              <view v-if="item.pei_jian_pay != 1 && filterData.tag == 'yg' && item.order_type!='回收订单' && item.order_type!='快递订单' && item.is_pay == 1 && (item.o_status ==20 || item.o_status ==25) && item.fa_fwmoney > 0 && base.show_base.wei_kuan == 1"
                  class="gui-margin-left gui-color-blue"
                  style="margin-right:-2rpx">
                  <hyb-price :title="item.fa_tzmoney > 0 ?'修改尾款':'追加尾款'" :data="item" @comfirm="comfrim"></hyb-price>
              </view>

              <view @tap="change(item,'sqwc')"
                v-if="$store.state.base.sf_sqwc && filterData.tag == 'yg' && ((item.pt_wzf_fengyong == 0 && item.pt_fengyong > 0) || !$store.state.base.sfyj ) && item.o_status == 25 && item.fa_tzmoney==0"
                @tap.prevent="change(item,'sqwc')" class="gui-margin-left gui-color-blue">申请验收
              </view>

              <view @tap="change(item,'bhys')"
                v-if="(filterData.tag == 'dl' || filterData.tag == 'manage') && item.o_status == 29"
                @tap.prevent="change(item,'bhys')" class="gui-margin-left gui-color-blue"
                style="margin-right:-2rpx">驳回
              </view>
              <view @tap="change(item,'qrwc')"
                v-if="(filterData.tag == 'dl' || filterData.tag == 'manage') && item.o_status == 29 && item.fa_tzmoney==0"
                @tap.prevent="change(item,'qrwc')" class="gui-margin-left gui-color-blue">通过
              </view>

              <hyb-price title="退款" :data="item" :max="Number(item.fa_fwmoney)" placeholder="请输入退款金额"
                @comfirm="confirmRefund"
                v-if="filterData.tag == 'manage' && item.is_pay && item.o_status != 12">
              </hyb-price>
            </view>
          </view>
        </view>
      </view>

      <hyb-dialog ref="changeYgDialog" @confirm="doChangeYg" title="更换员工">
        <template v-slot:content>
          <view class="gui-list-items gui-bg-white gui-padding-x gui-border-radius-large gui-margin-top">
            <gui-image :width="130" :height="130" mode="aspectFit" style="border-radius: 10rpx;"
              :src="changYgInfo.y_thumb" class="js-icon">
            </gui-image>
            <view class="gui-list-body">
              <view class="gui-list-title">
                <view class="gui-text gui-primary-text gui-ellipsis"
                  :class="tag==0?['gui-flex','gui-space-between','gui-flex1']:''">
                  <text>{{changYgInfo.name}}</text>
                  <text class="gui-text-small gui-color-grey2 bold gui-margin-left"
                    v-if="changYgInfo.distance != null">距离{{changYgInfo.distance}}km</text>
                </view>
              </view>

              <view class="gui-margin-top-small">
                <text class="gui-color-gray gui-text-small ">已接{{changYgInfo.fw_count}}单</text>
              </view>
              <view class="gui-list-body-desc gui-margin-top-small">
                <view class="gui-flex gui-row gui-nowrap gui-align-items-center gui-flex1">
                  <view class="gui-flex gui-align-items-center gui-space-between gui-flex1">
                    <gui-star :activecolor="base.qjcolor" fontSize="30rpx" :totalstars="5"
                      :starnum="5" :cantap="false"></gui-star>

                    <text class="gui-badge gui-bg-red gui-color-white gui-text-small">好评5</text>
                  </view>
                </view>
              </view>
            </view>
          </view>

          <view class="gui-padding-x gui-margin-top">
            <view class="gui-form-item gui-border-b gui-padding">
              <text class="gui-form-label gui-secondary-text">更换时间</text>
              <view class="gui-form-body">
                <gui-datetime :isSecond="false" :isMinute="false" round @confirm="setTime"
                  v-model="genghuan_time">
                  <input type="text" class="gui-form-input" v-model="genghuan_time"
                    placeholder="请选择更换时间" />
                </gui-datetime>
              </view>

              <view class="gui-icons gui-color-gray">&#xe601;</view>
            </view>
          </view>
        </template>
      </hyb-dialog>

      <hyb-poster width="300px" height="300px" ref="poster"></hyb-poster>
      <hyb-fuwu-time ref="timePopup" @change="confimTime"></hyb-fuwu-time>
      <hyb-empty v-if="list.length==0"></hyb-empty>
    </template>
  </hyb-page>
</template>
<script>
  import moment from 'moment';

  export default {
    data() {
      return {
        navItems: [],
        navItems_yg: [],
        list: [],
        page: 1,
        t_y_id: '',
        order_list_style: 1,
        lastPage: 1,
        filterData: {
          page: 1,
          tag: "",
          o_status: 0,
        },
        tags: {
          "需求服务": "gui-bg-primary",
          "订水服务": "gui-bg-green",
          "回收订单": "gui-bg-red",
          "服务订单": "gui-bg-yellow",
          "跑腿订单": "gui-bg-orange",
          "快递订单": "gui-bg-orange",
        },
        info: {},
        loading: false,
        currentInfo: null,
        juese: '用户',
        changYgInfo: {},
        genghuan_time: ''
      }
    },

    onLoad(options) {
      this.base = uni.storage.get("base");
      if (this.base.show_base.order_list_style == 1) {
        this.order_list_style = 1;
      } else {
        this.order_list_style = 1;
      }
      if (options.tag) {
        this.filterData.tag = options.tag;
      }

      if (this.filterData.tag == 'manage') {
        this.juese = '管理员'
      } else if (this.filterData.tag == 'yg') {
        this.juese = '员工'
      }

      if (options.t_y_id) {
        this.t_y_id = options.t_y_id;
      }
      if (options.tag == 'yg') {
        this.t_title = '我的接单';
        this.navItems_yg = this.base.yg_o_arr;
      } else if (options.tag == 'yh') {
        this.t_title = '我的发布';
        this.navItems = this.base.yh_o_arr;
      } else if (options.tag == 'shequ') {
        this.t_title = '社区订单';
        this.navItems = this.base.yh_o_arr;
      } else {
        this.t_title = '订单管理';
        this.navItems = this.base.yh_o_arr;
      }
      this.userinfo = uni.storage.get("userinfo");

      uni.$on("refresh_list", () => {
        this.query(1)
      })

      this.query();
    },
    onReachBottom() {
      if (this.loading) return;
      this.filterData.page++;
      if (this.filterData.page <= this.lastPage) {
        this.query()
      }
    },
    computed: {
      base: () => {
        return uni.storage.get("base")
      },
	  
    },

    methods: {
      getDisplayText(style1, style2) {
        const fullText = `${style1}-${style2}`;
        if (fullText.length > 10) {
          return '...' + fullText.slice(-10);
        }
        return fullText;
      },
      
      setTime(res) {
        this.genghuan_time = res[0] + '-' + res[1] + '-' + res[2] + ' ' + res[3] + ':00:00';
      },
      
      confirmRefund(item, money) {
        uni.gPost('fadan/refund', {
          fa_id: item.fa_id,
          money: money
        }).then(res => {
          uni.showToast({
            title: '操作成功'
          })
          this.query(1)
        })
      },

      getDays(item) {
        const endTime = moment(item.fa_fwtime).add(item.o_num, 'days')
        return endTime.diff(item.ksfw_time, 'day')
      },
      
      qianchu1(item) {
        uni.showModal({
          title: "签到",
          content: "是否确认签到?",
          success: async (res) => {
            if (res.confirm) {
              let location = await uni.location.getLocation();
              uni.gPost("fadan/qianchu", {
                latitude: location.latitude,
                longitude: location.longitude,
                fa_id: item.fa_id,
              }).then((data) => {
                uni.showToast({
                  title: "签到成功"
                })
                this.query();
              })
            }
          }
        })
      },

      qianchu(item) {
        uni.scanCode({
          success: async (res) => {
            let u_id = res.result;
            if (res.result == item.u_id) {
              let location = await uni.location.getLocation();
              uni.gPost("fadan/qianchu", {
                latitude: location.latitude,
                longitude: location.longitude,
                fa_id: item.fa_id,
              }).then((data) => {
                uni.showToast({
                  title: "签到成功"
                })
                this.query()
              })
            } else {
              uni.showToast({
                title: "签到失败，用户无此订单!"
              })
            }
          }
        })
      },

      qiandao1(item) {
        uni.showModal({
          title: "签到",
          content: "是否确认签到?",
          success: async (res) => {
            if (res.confirm) {
              let location = await uni.location.getLocation();
              uni.gPost("fadan/qiandao", {
                latitude: location.latitude,
                longitude: location.longitude,
                fa_id: item.fa_id,
              }).then((data) => {
                uni.showToast({
                  title: "签到成功"
                })
                this.query()
              })
            }
          }
        })
      },

      qiandao(item) {
        uni.scanCode({
          success: async (res) => {
            let u_id = res.result;
            if (res.result == item.u_id) {
              let location = await uni.location.getLocation();
              uni.gPost("fadan/qiandao", {
                latitude: location.latitude,
                longitude: location.longitude,
                fa_id: item.fa_id,
              }).then((data) => {
                uni.showToast({
                  title: "签到成功"
                })
                this.query()
              })
            } else {
              uni.showToast({
                title: "签到失败，用户无此订单!"
              })
            }
          }
        })
      },
      
      hexiao1(item) {
        uni.scanCode({
          success: (res) => {
            if (res.result == item.fa_id) {
              uni.showModal({
                title: "核销",
                content: "是否核销该订单?",
                confirmText: "核销",
                success: (res) => {
                  this.doChange(item.fa_id, 'qrwc');
                  uni.showToast({
                    title: "核销成功"
                  })

                  setTimeout(() => {
                    this.query(1)
                  }, 2000);
                }
              })
            } else {
              uni.showToast({
                title: "订单信息不匹配!",
                icon: "none"
              })
            }
          }
        })
      },

      hexiao(item) {
        uni.gPost("qrcode", {
          text: item.fa_id
        }).then((res) => {
          uni.previewImage({
            urls: [res]
          })
        })
      },

      callJs(item) {
        uni.makePhoneCall({
          phoneNumber: item.yuangong.y_telphone
        })
      },

      openShelf(item) {
        uni.showActionSheet({
          itemList: ["扫码开锁", "手机开锁", "收货完成"],
          success: (res) => {
            if (res.tapIndex == 0) {
              uni.scanCode({
                success: (res) => {
                  uni.gPost("znwl/shelf/open", {
                    fa_id: item.fa_id,
                    code: res.result,
                  }).then((res) => {
                    uni.showToast({
                      title: "操作成功"
                    })
                  })
                }
              })
            } else if (res.tapIndex == 1) {
              uni.gPost("znwl/shelf/open", {
                fa_id: item.fa_id,
                id: item.box_id,
              }).then((res) => {
                uni.showToast({
                  title: "操作成功"
                })
              })
            } else if (res.tapIndex == 2) {
              uni.showModal({
                title: "收货完成",
                content: "确认您已经取到快递盒，且开始送货?",
                success: (res) => {
                  if (res.confirm) {
                    uni.gPost("znwl/shelf/close", {
                      fa_id: item.fa_id,
                      id: item.box_id,
                    }).then((res) => {
                      uni.showToast({
                        title: "操作成功"
                      })
                      this.query();
                    })
                  }
                }
              })
            }
          }
        })
      },

      caozuo(item) {
        uni.showActionSheet({
          itemList: ["更换盒子", "扫码开盒", "手机开盒", "确认关闭"],
          success: (res) => {
            if (res.tapIndex == 0) {
              uni.showModal({
                title: "更换盒子",
                content: "更换盒子会取消当前已经选择的盒子，是否继续操作?",
                success: (res) => {
                  if (res.confirm) {
                    uni.gPost("znwl/box/fadan", {
                      fa_id: item.fa_id,
                      id: item.box_id,
                      flag: 1,
                    }).then((res) => {
                      item.box_id = 0;
                      uni.navigateTo({
                        url: "/znwl/box/list?tag=yh&fa_id=" + item.fa_id
                      })
                    })
                  }
                }
              })
            } else if (res.tapIndex == 1) {
              uni.scanCode({
                success: (res) => {
                  uni.gPost("znwl/box/open", {
                    code: res.result,
                  }).then((res) => {
                    uni.showToast({
                      title: "操作成功"
                    })
                  })
                }
              })
            } else if (res.tapIndex == 2) {
              uni.gPost("znwl/box/open", {
                id: item.box_id,
              }).then((res) => {
                uni.showToast({
                  title: "操作成功"
                })
              })
            } else if (res.tapIndex == 3) {
              uni.showModal({
                title: "确认关闭",
                content: "确认已将您寄件放入盒子，确认后盒子将无法再开启",
                success: (res) => {
                  if (res.confirm) {
                    uni.gPost("znwl/box/close", {
                      fa_id: item.fa_id,
                      id: item.box_id,
                    }).then((res) => {
                      uni.showToast({
                        title: "操作成功"
                      })
                      this.query();
                    })
                  }
                }
              })
            }
          }
        })
      },
      
      toudi(id) {
        uni.navigateTo({
          url: "/znwl/box/list?tag=yh&fa_id=" + id
        })
      },

      payYj(info) {
        uni.showActionSheet({
          itemList: ["余额支付", "微信支付"],
          success: (res) => {
            uni.$pay.pay("pay/yongjin", {
              fa_id: info.fa_id,
            }, res.tapIndex).then(() => {
              this.query(1);
            })
          }
        })
      },

      toDetail(id, o_status) {
        if (o_status == 12 && this.filterData.tag != 'manage') {
          uni.showModal({
            title: "提示信息",
            content: "订单已取消，不能查看！",
            showCancel: false,
          })
          return;
        }

        uni.navigateTo({
          url: '/hyb_o2o/inner/pages/fabu/detail?id=' + id + '&tag=' + this.filterData.tag +
            '&t_y_id=' + this.t_y_id
        })
      },

      baojia(info) {
        if (this.filterData.tag == 'yg') {
          if (info.o_status <= 20) {
            uni.navigateTo({
              url: "/hyb_o2o/inner/pages/baojia/list?tag=yg&id=" + info.fa_id
            })
          } else {
            uni.navigateTo({
              url: "/hyb_o2o/inner/pages/baojia/list?tag=yg&id=" + info.fa_id
            })
          }
        } else if (this.filterData.tag == 'yh') {
          uni.navigateTo({
            url: "/hyb_o2o/inner/pages/baojia/list?tag=yh&id=" + info.fa_id
          })
        } else if (this.filterData.tag == 'manage') {
          uni.navigateTo({
            url: "/hyb_o2o/inner/pages/baojia/list?tag=manage&id=" + info.fa_id
          })
        } else if (this.filterData.tag == 'dl') {
          uni.navigateTo({
            url: "/hyb_o2o/inner/pages/baojia/list?tag=dl&id=" + info.fa_id
          })
        }
      },

      confimTime(time) {
        uni.showModal({
          title: this.info.fa_fwtime ? '修改预约时间' : '设置预约时间',
          content: "是否确认" + (this.info.fa_fwtime ? '修改预约时间' : '设置预约时间') + "?",
          success: (res) => {
            if (res.confirm) {
              uni.gPost("fadan/save", {
                fa_id: this.info.fa_id,
                fa_fwtime: time
              }).then((res) => {
                uni.showToast({
                  title: "操作成功"
                })
                this.query();
              })
            }
          }
        })
      },
      
      yuyue(info) {
        this.info = info;
        this.$refs.timePopup.popup(info.fa_x_id);
      },

      lingdan(id) {
        // #ifdef MP
        let path = "/hyb_o2o/inner/pages/fabu/detail?tag=ld&id=" + id;
        uni.downloadFile({
          url: "https://xjz.cyygkj.cn/api/mp/qrcode?uniacid=" + uni.getStorageSync("uniacid") +
            "&path=" + encodeURIComponent(path),
          success: ((res) => {
            uni.previewImage({
              urls: [res.tempFilePath]
            })
          })
        })
        // #endif

        // #ifdef H5
        let path = window.location.href.split("#")[0] + "#" + "/hyb_o2o/inner/pages/fabu/detail?tag=ld&id=" + id;
        let items = [{
            type: "text",
            text: "扫码领单",
            size: 18,
            align: "center",
            x: 150,
            y: 35
          },
          {
            type: "qrcode",
            text: path,
            x: 50,
            y: 70,
            width: 200
          }
        ];
        this.$refs.poster.make(items).then((src) => {
          uni.previewImage({
            urls: [src]
          })
        })
        // #endif
      },

      cd(id) {
        uni.navigateTo({
          url: "/hyb_o2o/inner/pages/fabu/form?id=" + id
        })
      },

      copy(info) {
        let data = info.fa_fwcontent;
        uni.setClipboardData({
          data: data,
          success: () => {
            uni.showToast({
              title: "复制成功"
            })
          }
        })
      },

      changeMoney(item, money) {
        uni.gPost("fadan/save", {
          fa_id: item.fa_id,
          fa_fwmoney: money
        }).then(() => {
          uni.showToast({
            title: "修改成功"
          })
          this.query(1)
        })
      },

      paidan(item) {
        uni.$off("choose_jishi");
        uni.$once("choose_jishi", (info) => {
          uni.gPost("fadan/qiangdan", {
            fa_id: item.fa_id,
            y_id: info.y_id
          }).then(() => {
            uni.showToast({
              title: "派单成功"
            })
            this.query(1)
          })
        })

        uni.navigateTo({
          url: "/hyb_o2o/jishi/list/list?tag=1&juese=paidan&fa_id=" + item.fa_id + '&xt_id=' + item.er_fenlei_id
        })
      },

      print(id) {
        uni.showModal({
          title: '打印订单',
          content: '确认是否打印订单?',
          success: (res) => {
            if (res.confirm) {
              uni.gPost("fadan/print", {
                fa_id: id,
              }).then((res) => {
                if (res == 1) {
                  uni.showToast({
                    title: '正在打印',
                    icon: 'loading'
                  })
                }
              })
            }
          }
        })
      },

      doChangeYg(item) {
        if (this.genghuan_time) {
          uni.gPost("qiangdan/change", {
            fa_id: item.fa_id,
            y_id: this.changYgInfo.y_id,
            genghuan_time: this.genghuan_time,
          }).then(() => {
            uni.showToast({
              title: "更换成功"
            })
            this.$refs.changeYgDialog.close()
          })
        } else {
          uni.showToast({
            title: "请选择更换时间",
            icon: "none"
          })
        }
      },

      changeYg(item) {
        uni.$once("choose_jishi", (info) => {
          this.changYgInfo = info
          this.$refs.changeYgDialog.open(item)
        })
        uni.navigateTo({
          url: "/hyb_o2o/jishi/list/list?tag=1&juese=paidan&xt_id=" + item.er_fenlei_id + '&fa_id=' + item.fa_id
        })
      },

      pingjia(id) {
        // uni.navigateTo({
        //   url: "/hyb_o2o/addpages/pages/pingjia/pingjia?tag=fadan&id=" + id
        // })
      },

      comfrim(item, money) {
        uni.gPost("fadan/change", {
          juese: this.juese,
          fa_id: item.fa_id,
          c_type: "tzje",
          money: money,
        }).then((res) => {
          uni.showToast({
            title: "操作成功",
          })
          setTimeout(() => {
            this.query(1)
          }, 1500)
        })
      },

      // 修改上门估价报价
      changePrice(item, money) {
        uni.gPost("fadan/save", {
          fa_id: item.fa_id,
          fa_fwmoney: money
        }).then((res) => {
          uni.showToast({
            title: "报价修改成功",
          })
          setTimeout(() => {
            this.query(1)
          }, 1500)
        })
      },

      pay(fa_id, tag) {
        uni.showActionSheet({
          itemList: ["余额支付", "微信支付"],
          success: (res) => {
            uni.$pay.pay("pay/fadan", {
              fa_id: fa_id,
            }, res.tapIndex).then(() => {
              this.query(1);
            })
          }
        })
      },
      
      navChange(index) {
        if (this.filterData.tag == 'yg') {
          this.filterData.o_status = this.navItems_yg[index].key;
        } else {
          this.filterData.o_status = this.navItems[index].key;
        }
        this.query(1);
      },

      change(info, c_type) {
        this.currentInfo = info
        if (c_type == "qrwc" && this.filterData.tag == 'yg' && info.order_type == '回收订单') {
          uni.showModal({
            title: "是否确认完成回收订单",
            content: "确认完成以后会从您的余额扣除回收应付款项到用户余额中！",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else if (c_type == "qrwc" && (this.filterData.tag == 'yh' || this.filterData.tag == 'yg')) {
          uni.showModal({
            title: "订单完成确认",
            content: "是否确认服务已完成，点击确认通过后订单将进入已完成状态！",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            },
          })
        } else if (c_type == "qrwc" && (this.filterData.tag == 'sj' || this.filterData.tag == 'dl' || this.filterData.tag == 'manage')) {
          uni.showModal({
            title: "订单完成确认",
            content: "是否向用户确认" + this.$store.state.base.show_base.shifu_bie_ming + "订单已完成，点击确认通过，订单将进入已完成",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else if (c_type == "bhys" && this.filterData.tag == 'dl') {
          uni.showModal({
            title: "驳回确认",
            content: "是否确认驳回" + this.$store.state.base.show_base.shifu_bie_ming + "验收申请，驳回后，订单将重回服务中状态。",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else if (c_type == "sqwc" && this.filterData.tag == 'yg') {
          uni.showModal({
            title: "申请验收",
            content: '您申请「提交完成」后，平台将安排区域管理员，过去现场验收，听取反馈。若验收通过，由区域管理员「确认完成」。',
            confirmText: "申请验收",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else if (c_type == "ksfw" && this.filterData.tag == 'yg') {
          uni.showModal({
            title: "开始服务",
            content: '是否确认与客户达成交易，若「开始服务」,订单进入服务中。',
            confirmText: "开始服务",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else if (c_type == "qxjd" && this.filterData.tag == 'yg') {
          uni.showModal({
            title: "取消接单",
            content: '是否确认取消接单？',
            confirmText: "取消接单",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else if (c_type == "qxdd") {
          uni.showModal({
            title: "取消订单",
            content: '是否确认取消订单?确认后订单将终止进程，进入取消状态，已付款金额将会原路返还',
            confirmText: "确认",
            success: (res) => {
              if (res.confirm) {
                this.doChange(info.fa_id, c_type);
              }
            }
          })
        } else {
          this.doChange(info.fa_id, c_type);
          uni.showToast({
            title: "操作成功",
            success: () => {
              this.query(1)
            }
          })
        }
      },

      rad(d) {
        return d * Math.PI / 180.0;
      },

    getDistance(lat1, lng1, lat2, lng2) {
      // 将经纬度转换为弧度
      const radLat1 = this.rad(lat1);
      const radLat2 = this.rad(lat2);
      const a = radLat1 - radLat2;
      const b = this.rad(lng1) - this.rad(lng2);
      
      // 使用Haversine公式计算距离
      const haversine = Math.pow(Math.sin(a / 2), 2) + 
                       Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2);
      const distance = 2 * Math.asin(Math.sqrt(haversine)) * 6378.137; // 地球半径6378.137km
      
      // 四舍五入保留4位小数
      return Math.round(distance * 10000) / 10000;
    },
      
      async doChange(fa_id, c_type) {
        if (c_type == 'ksfw') {
          const locaiton = await uni.location.getLocation()
          if (locaiton) {
            const distance = this.getDistance(
              locaiton.latitude,
              locaiton.longitude,
              this.currentInfo.fa_fwlatitude,
              this.currentInfo.fa_fwlongitude)

            if (distance > this.$store.state.base.yg_set.ksfw_gls) {
              uni.showModal({
                title: "信息提示",
                content: "操作失败,当前距离服务地址" + distance + "公里，请在" + this.$store.state.base.yg_set.ksfw_gls +
                  "公里范围内开始服务",
                showCancel: false,
              })
              return
            }
          } else {
            uni.showToast({
              title: "获取定位失败",
              icon: 'none'
            })
          }
        }
        uni.gPost("fadan/change", {
          fa_id: fa_id,
          c_type: c_type
        }).then((res) => {
          uni.showToast({
            title: "操作成功",
            success: () => {
              if (c_type === "qrwc" && this.filterData.tag === 'yh') {
                // 只有用户确认完成时才询问是否要评价
                uni.showModal({
                  title: "订单完成",
                  content: "订单已完成，是否要对本次服务进行评价？",
                  confirmText: "去评价",
                  cancelText: "暂不评价",
                  success: (modalRes) => {
                    if (modalRes.confirm) {
                      // 用户选择去评价
                      // uni.navigateTo({
                      //   url: `/hyb_o2o/addpages/pages/pingjia/pingjia?tag=fadan&id=${fa_id}`
                      // });
                    } else {
                      // 用户选择暂不评价，刷新列表
                      this.query(1);
                    }
                  }
                });
              } else {
                this.query(1);
              }
            }
          });
        })
      },

      query(page) {
        this.loading = true;
        if (page) {
          this.filterData.page = page;
          this.lastPage = 1;
        }
        if (this.filterData.page > this.lastPage) return;
        if (this.filterData.page == 1) {
          this.list = [];
        }
        if (this.t_y_id) this.filterData.t_y_id = this.t_y_id;
        uni.gPost("fadan/list", this.filterData).then((res) => {
          this.lastPage = res.last_page;
          this.list_q = [];
          res.data.forEach((item) => {
            if (item.fadan) {
              item.fadan['q_styles'] = item.q_styles;
              if (item.fadan['q_styles'] == '已拒绝' || item.fadan['q_styles'] == '已更换') {
                item.fadan['o_status'] = 0;
                item.fadan['fa_id'] = 0;
              }

              this.list.push(item.fadan);
            } else {
              this.list.push(item);
            }
          })
          this.loading = false;
        })
      }
    }
  }
</script>
<style>
  /* 自定义吸顶元素样式 */
  .fixed-top-view {
    height: 100rpx;
  }

  .gui-margin-left {
    margin-left: 30rpx;
    margin-right: 0;
  }

  .graceSelectMenuItem {
    width: 180rpx;
  }

  .price-input {
    width: 120rpx;
    padding: 10rpx 0;
    border-radius: 5rpx;
    text-align: center;
  }

  .right-area-footer {
    width: 580rpx;
    height: 100rpx;
  }

  .right-area-footer-btn {
    width: 290rpx;
    height: 100rpx;
    line-height: 100rpx;
    font-size: 28rpx;
    text-align: center;
  }

  /* 新增的样式 */
  .relative {
    position: relative;
  }

  .gui-badge {
    display: inline-block;
    padding: 4rpx 12rpx;
    border-radius: 20rpx;
    font-size: 20rpx;
    line-height: 1;
  }

  .gui-bg-blue {
    background-color: #165DFF;
  }

  .gui-bg-red {
    background-color: #F53F3F;
  }

  .gui-color-white {
    color: #FFFFFF;
  }

  .gui-color-blue {
    color: #165DFF;
  }

  .gui-color-red {
    color: #F53F3F;
  }

  .gui-color-gray {
    color: #86909C;
  }

  .gui-color-black {
    color: #1D2129;
  }

  .gui-text-small {
    font-size: 24rpx;
  }

  .gui-text {
    font-size: 28rpx;
  }

  .gui-bold {
    font-weight: bold;
  }

  .gui-flex {
    display: flex;
  }

  .gui-space-between {
    justify-content: space-between;
  }

  .gui-align-items-center {
    align-items: center;
  }

  .gui-justify-content-end {
    justify-content: flex-end;
  }

  .gui-flex-shrink0 {
    flex-shrink: 0;
  }

  .gui-flex1 {
    flex: 1;
  }

  .gui-padding {
    padding: 20rpx;
  }

  .gui-padding-x {
    padding-left: 20rpx;
    padding-right: 20rpx;
  }

  .gui-padding-y {
    padding-top: 20rpx;
    padding-bottom: 20rpx;
  }

  .gui-margin-top {
    margin-top: 20rpx;
  }

  .gui-margin-top-small {
    margin-top: 10rpx;
  }

  .gui-margin-top-middle {
    margin-top: 9rpx;
  }

  .gui-margin-left {
    margin-left: 30rpx;
  }

  .gui-margin-x {
    margin-left: 20rpx;
    margin-right: 20rpx;
  }

  .gui-margin-x-small {
    margin-left: 10rpx;
    margin-right: 10rpx;
  }

  .gui-border-b {
    border-bottom: 1rpx solid #F2F3F5;
  }

  .gui-border-t {
    border-top: 1rpx solid #F2F3F5;
  }

  .gui-border-radius-large {
    border-radius: 16rpx;
  }

  .gui-bg-white {
    background-color: #FFFFFF;
  }

  .gui-dark-bg-level-3 {
    background-color: #F7F8FA;
  }

  .gui-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gui-list-items {
    display: flex;
    padding: 20rpx;
    align-items: center;
  }

  .gui-list-body {
    flex: 1;
    margin-left: 20rpx;
  }

  .gui-list-title {
    display: flex;
    align-items: center;
  }

  .gui-list-title-text {
    flex: 1;
    font-size: 30rpx;
  }

  .gui-list-title-desc {
    font-size: 24rpx;
    margin-left: 20rpx;
  }

  .gui-list-body-desc {
    font-size: 24rpx;
    color: #86909C;
    line-height: 1.6;
  }

  .gui-list-arrow-right {
    font-size: 32rpx;
    margin-left: 20rpx;
  }

  .gui-form-item {
    display: flex;
    align-items: center;
    padding: 20rpx 0;
  }

  .gui-form-label {
    width: 160rpx;
    font-size: 28rpx;
  }

  .gui-form-body {
    flex: 1;
  }

  .gui-form-input {
    width: 100%;
    font-size: 28rpx;
    padding: 10rpx 0;
  }

  

  /* 新增的特定功能样式 */
  .js-icon {
    border: 1rpx solid #F2F3F5;
  }

  .bold {
    font-weight: bold;
  }

  .gui-button-mini {
    height: 60rpx;
    line-height: 60rpx;
    font-size: 26rpx;
    padding: 0 20rpx;
    border-radius: 30rpx;
    display: inline-block;
    text-align: center;
  }

  .gui-bg-orange {
    background-color: #FF7D00;
  }

  .gui-bg-yellow {
    background-color: #F7BA1E;
  }

  .gui-bg-green {
    background-color: #00B42A;
  }

  .gui-bg-primary {
    background-color: #165DFF;
  }

  /* 新增的扫码相关样式 */
  .qrcode-container {
    text-align: center;
    padding: 40rpx;
  }

  .qrcode-title {
    font-size: 32rpx;
    margin-bottom: 20rpx;
  }

  .qrcode-image {
    width: 400rpx;
    height: 400rpx;
    margin: 0 auto;
  }

  /* 新增的盒子操作样式 */
  .box-operation {
    margin-top: 30rpx;
    padding: 20rpx;
    background-color: #F7F8FA;
    border-radius: 10rpx;
  }

  .box-operation-title {
    font-size: 28rpx;
    margin-bottom: 15rpx;
    font-weight: bold;
  }

  /* 新增的签到样式 */
  .signin-container {
    text-align: center;
    padding: 40rpx;
  }

  .signin-button {
    margin-top: 30rpx;
  }

  /* 响应式调整 */
  @media (max-width: 600rpx) {
    .gui-list-items {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .gui-list-body {
      margin-left: 0;
      margin-top: 20rpx;
      width: 100%;
    }
    
    .right-area-footer {
      width: 100%;
    }
    
    .right-area-footer-btn {
      width: 50%;
    }
  }
</style>
